home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.5 KB | 37 lines | [TEXT/GEOL] |
- Item 8360525 1-Aug-90 06:30PDT
-
- From: ROSENSTEIN1 Rosenstein, Larry
-
- To: D4695 Skywalker Sys, Scott Collins,PRT
- MACAPP.TECH$ MacApp Technical
-
- Sub: RE>Key Command Objects an
-
- Attn: Skywalker Sys, Scott Collins,P
- Attn: MacApp Technical
- SentBy: Larry Rosenstein
- Reply to: RE>Key Command Objects and DoI
- A lot depends on the behavior you want with respect to Undo. The question is
- whether each arrow keystroke is undoable individually, or whether a series of
- the same keystroke involving the same object is undoable as a unit. (This is
- similar to the way typing works.)
-
- In the former case, you create the command object in DoKeyCommand, and tell
- the command object to move the event one unit. You can use the same command
- object as in the mouse tracking case, except that the distance to move is
- constant instead of defined by the mouse.
-
- In the latter case, you need to take the same approach as TEView; you create
- the command object on the first keystroke and simply update it on subsequent
- keystrokes. At any point if the user chooses Undo, the entire sequence of
- keystrokes is undone.
-
- You can get different behaviors depending on how you determine whether to
- reuse or create a new command object. (For example, what should happen if the
- user does 3 keystrokes, chooses Undo then Redo, and then type additional
- keystrokes? Do you then undo everything or just the last set of keystrokes?)
-
- Larry Rosenstein
-
-
-